﻿using System;
using Sharp.DataTransferObject;
using Sharp.Portal;
using Sharp.Portal.AdminLTE;
using Sharp.Portal.Mvc.List;
using Sharp.Portal.Other;

namespace Sharp.WebBooter.Areas.Workflow.Models
{
    /// <summary>
    /// 流程管理
    /// </summary>
    [ModuleCode("ProcessInstanceManage"), Title("流程管理")]
    [DataHandler("Handle", "处理", 0,Icon = "fa fa-window-restore")]
    [DataHandler("Schedule", "进度", 1,Icon = "fa fa-window-maximize")]
    public class TaskIndexModel : BSSharpList
    {
        public TaskIndexModel()
        {
            this.Feature = ListFeature.MultiSelect | ListFeature.Paging | ListFeature.RowNumber;
        }
        /// <summary>
        /// 主键Id
        /// </summary>
        /// <value>主键Id</value>
        [Column(Text = "Id", Hidden = true)]
        public System.Guid Id { get; set; }

        /// <summary>
        /// 流程状态
        /// </summary>
        [Column(Text = "流程状态", Width = 100, DataIndex = "processInstance.processStateText"), QueryOption(Option = QueryFeature.NoneQuery)]
        public string ProcessStateText { get; set; }
        /// <summary>
        /// 实例名称
        /// </summary>
        [Column(Text = "实例名称", Width = 100), QueryOption(Option = QueryFeature.DefualtQuery)]
        public string ProcessName { get; set; }
        /// <summary>
        /// 当前节点名称
        /// </summary>
        [Column(Text = "当前节点名称", Width = 100)]
        public string ActivityName { get; set; }

        /// <summary>
        /// 发起人
        /// </summary>
        [Column(Text = "发起人", Width = 100)]
        public string CreatedUserName { get; set; }
        /// <summary>
        /// 发起时间
        /// </summary>
        [DateColumn(Width = 144, Text = "发起时间", Format = "yyyy-MM-dd HH:mm:ss")]
        public DateTime? CreatedTime { get; set; }
    }
}